<?php
/*
 * load xml from DOM document
 * 
 * It can convert a node of DOM into a SimpleXML node.
 * 
 */ 

$dom = new domDocument;
$dom->loadXML('<note><from>John</from></note>');

$xml = simplexml_import_dom($dom);

echo "xml->from: $xml->from \n";
var_dump($xml);
